<template>
  <div class="not-found">
    <t-result
      theme="default"
      title="404"
      description="抱歉，您访问的页面不存在"
    >
      <template #icon>
        <t-icon name="close-circle" size="80px" />
      </template>
      <template #action>
        <t-button theme="primary" @click="goHome">
          返回首页
        </t-button>
      </template>
    </t-result>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/')
}
</script>

<style lang="less" scoped>
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
</style>